#include "GSharpPropertyList.h"
#include "GSharpFieldProperty.h"
#include "FieldValuesContainer.h"

CGSharpPropertyList::CGSharpPropertyList(CType *InOwnerType)
    : CPropertyList(InOwnerType)
{
}

CGSharpPropertyList::~CGSharpPropertyList()
{

}

CGSharpFieldValuesContainer* CGSharpPropertyList::CreateStaticFieldValues()
{
    TVector<CGSharpFieldProperty*> StaticScriptFields;

    //assume that StaticFieldProperties is a vector of CGSharpField
    for(auto& FieldProperty : StaticFieldProperties)
    {
        if(!FieldProperty->IsField() || !FieldProperty->IsScript())
        {
            continue;
        }
        CGSharpFieldProperty *Field = reinterpret_cast<CGSharpFieldProperty *>(FieldProperty);
        StaticScriptFields.Add(Field);
    }

    return new CGSharpFieldValuesContainer(StaticScriptFields
        , 0 //TODO calculate a proper value
    );
}
